3.200 \(\int \frac{\cot ^2(a+i \log (x))}{x^3} \, dx\)

Optimal. Leaf size=57 \[ \frac{2 e^{-2 i a}}{1-\frac{e^{2 i a}}{x^2}}+2 e^{-2 i a} \log \left (1-\frac{e^{2 i a}}{x^2}\right )+\frac{1}{2 x^2} \]

[Out]

2/(E^((2*I)*a)*(1 - E^((2*I)*a)/x^2)) + 1/(2*x^2) + (2*Log[1 - E^((2*I)*a)/x^2])/E^((2*I)*a)

________________________________________________________________________________________

Rubi [F]  time = 0.050647, antiderivative size = 0, normalized size of antiderivative = 0., number of steps used = 0, number of rules used = 0, integrand size = 0, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0., Rules used = {} \[ \int \frac{\cot ^2(a+i \log (x))}{x^3} \, dx \]

Verification is Not applicable to the result.

[In]

Int[Cot[a + I*Log[x]]^2/x^3,x]

[Out]

Defer[Int][Cot[a + I*Log[x]]^2/x^3, x]

Rubi steps

\begin{align*} \int \frac{\cot ^2(a+i \log (x))}{x^3} \, dx &=\int \frac{\cot ^2(a+i \log (x))}{x^3} \, dx\\ \end{align*}

Mathematica [B]  time = 0.221049, size = 153, normalized size = 2.68 \[ \cos (2 a) \left (\log \left (-2 x^2 \cos (2 a)+x^4+1\right )-4 \log (x)\right )+\frac{2 \cos (a)}{\left (x^2-1\right ) \cos (a)-i \left (x^2+1\right ) \sin (a)}+\frac{2 \sin (a)}{\left (x^2+1\right ) \sin (a)+i \left (x^2-1\right ) \cos (a)}-i \sin (2 a) \log \left (-2 x^2 \cos (2 a)+x^4+1\right )+(-4 \sin (a) \cos (a)-2 i \cos (2 a)) \tan ^{-1}\left (\frac{\cot (a)-x^2 \cot (a)}{x^2+1}\right )+4 i \sin (2 a) \log (x)+\frac{1}{2 x^2} \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[a + I*Log[x]]^2/x^3,x]

[Out]

1/(2*x^2) + Cos[2*a]*(-4*Log[x] + Log[1 + x^4 - 2*x^2*Cos[2*a]]) + (2*Cos[a])/((-1 + x^2)*Cos[a] - I*(1 + x^2)
*Sin[a]) + (2*Sin[a])/(I*(-1 + x^2)*Cos[a] + (1 + x^2)*Sin[a]) + ArcTan[(Cot[a] - x^2*Cot[a])/(1 + x^2)]*((-2*
I)*Cos[2*a] - 4*Cos[a]*Sin[a]) + (4*I)*Log[x]*Sin[2*a] - I*Log[1 + x^4 - 2*x^2*Cos[2*a]]*Sin[2*a]

________________________________________________________________________________________

Maple [A]  time = 0.074, size = 76, normalized size = 1.3 \begin{align*}{\frac{1}{2\,{x}^{2}}}-2\,{\frac{1}{{x}^{2} \left ( \left ({{\rm e}^{i \left ( a+i\ln \left ( x \right ) \right ) }} \right ) ^{2}-1 \right ) }}-4\,{\frac{\ln \left ( x \right ) }{ \left ({{\rm e}^{ia}} \right ) ^{2}}}+2\,{\frac{\ln \left ({{\rm e}^{ia}}-x \right ) }{ \left ({{\rm e}^{ia}} \right ) ^{2}}}+2\,{\frac{\ln \left ({{\rm e}^{ia}}+x \right ) }{ \left ({{\rm e}^{ia}} \right ) ^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(a+I*ln(x))^2/x^3,x)

[Out]

1/2/x^2-2/x^2/(exp(I*(a+I*ln(x)))^2-1)-4/exp(I*a)^2*ln(x)+2/exp(I*a)^2*ln(exp(I*a)-x)+2/exp(I*a)^2*ln(exp(I*a)
+x)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(a+I*log(x))^2/x^3,x, algorithm="maxima")

[Out]

Exception raised: RuntimeError

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \frac{{\left (x^{2} e^{\left (2 i \, a - 2 \, \log \left (x\right )\right )} - x^{2}\right )}{\rm integral}\left (-\frac{e^{\left (2 i \, a - 2 \, \log \left (x\right )\right )} + 3}{x^{3} e^{\left (2 i \, a - 2 \, \log \left (x\right )\right )} - x^{3}}, x\right ) - 2}{x^{2} e^{\left (2 i \, a - 2 \, \log \left (x\right )\right )} - x^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(a+I*log(x))^2/x^3,x, algorithm="fricas")

[Out]

((x^2*e^(2*I*a - 2*log(x)) - x^2)*integral(-(e^(2*I*a - 2*log(x)) + 3)/(x^3*e^(2*I*a - 2*log(x)) - x^3), x) -
2)/(x^2*e^(2*I*a - 2*log(x)) - x^2)

________________________________________________________________________________________

Sympy [A]  time = 1.17795, size = 60, normalized size = 1.05 \begin{align*} \frac{5 x^{2} - e^{2 i a}}{2 x^{4} - 2 x^{2} e^{2 i a}} - 4 e^{- 2 i a} \log{\left (x \right )} + 2 e^{- 2 i a} \log{\left (x^{2} - e^{2 i a} \right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(a+I*ln(x))**2/x**3,x)

[Out]

(5*x**2 - exp(2*I*a))/(2*x**4 - 2*x**2*exp(2*I*a)) - 4*exp(-2*I*a)*log(x) + 2*exp(-2*I*a)*log(x**2 - exp(2*I*a
))

________________________________________________________________________________________

Giac [B]  time = 1.34441, size = 257, normalized size = 4.51 \begin{align*} \frac{2 \, x^{4} \log \left (x^{2} - e^{\left (2 i \, a\right )}\right )}{x^{4} e^{\left (2 i \, a\right )} - x^{2} e^{\left (4 i \, a\right )}} - \frac{4 \, x^{4} \log \left (x\right )}{x^{4} e^{\left (2 i \, a\right )} - x^{2} e^{\left (4 i \, a\right )}} - \frac{2 \, x^{2} e^{\left (2 i \, a\right )} \log \left (x^{2} - e^{\left (2 i \, a\right )}\right )}{x^{4} e^{\left (2 i \, a\right )} - x^{2} e^{\left (4 i \, a\right )}} + \frac{4 \, x^{2} e^{\left (2 i \, a\right )} \log \left (x\right )}{x^{4} e^{\left (2 i \, a\right )} - x^{2} e^{\left (4 i \, a\right )}} + \frac{5 \, x^{2} e^{\left (2 i \, a\right )}}{2 \,{\left (x^{4} e^{\left (2 i \, a\right )} - x^{2} e^{\left (4 i \, a\right )}\right )}} - \frac{e^{\left (4 i \, a\right )}}{2 \,{\left (x^{4} e^{\left (2 i \, a\right )} - x^{2} e^{\left (4 i \, a\right )}\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(a+I*log(x))^2/x^3,x, algorithm="giac")

[Out]

2*x^4*log(x^2 - e^(2*I*a))/(x^4*e^(2*I*a) - x^2*e^(4*I*a)) - 4*x^4*log(x)/(x^4*e^(2*I*a) - x^2*e^(4*I*a)) - 2*
x^2*e^(2*I*a)*log(x^2 - e^(2*I*a))/(x^4*e^(2*I*a) - x^2*e^(4*I*a)) + 4*x^2*e^(2*I*a)*log(x)/(x^4*e^(2*I*a) - x
^2*e^(4*I*a)) + 5/2*x^2*e^(2*I*a)/(x^4*e^(2*I*a) - x^2*e^(4*I*a)) - 1/2*e^(4*I*a)/(x^4*e^(2*I*a) - x^2*e^(4*I*
a))